import request from '@/utils/request'
export default {

  getCourse() {
    return request({
      url: `/course/get`,
      method: "get",
    });
  },
  getCoursePageCondition(current,limit,courseQuery) {
    return request({
      url: `/course/page/condition/${current}/${limit}`,
      method: "post",
      data:courseQuery
    });
  },
  getOneCourse(id){
    return request({
      url:`/course/get/${id}`,
      method:"get"
    })
  },
  updateCourse(course){
    return request({
      url:`/course/update`,
      method:"post",
      data:course
    })
  },
  getCourseMenu(){
    return request({
      url:`/course/getCourse`,
      method:"get",
    })
  },
   deleteCourse(id){
    return request({
      url:`/course/delete/${id}`,
      method:"delete",
    })
  },
  addCourse(course){
    return request({
      url:`/course/add`,
      method:"post",
      data:course
    })
  },
}
